/*
 * Copyright 2022-2025 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.instancio.test.pojo.beanvalidation.person;

import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Past;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import org.hibernate.validator.constraints.UUID;
import org.instancio.test.support.pojo.person.PersonName;

import java.time.LocalDateTime;
import java.util.Date;

@Data
public class PersonBV {

    @NotNull
    @UUID
    private String uuid;

    @PersonName // this his not a validation annotation and should be ignored
    @NotNull
    @Length(min = 2)
    private String name;

    private AddressBV address;

    @Range(min = 18, max = 65)
    private int age;

    @Past
    private LocalDateTime lastModified;

    @Future
    private Date date;

    @NotNull
    @Size(max = 3)
    private PetBV[] pets;
}
